Optimal. Leaf size=37 \[ \frac {2 \sqrt {a} \sinh ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {3886, 221}
\begin {gather*} \frac {2 \sqrt {a} \sinh ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 221
Rule 3886
Rubi steps
\begin {align*} \int \sqrt {\sec (e+f x)} \sqrt {a+a \sec (e+f x)} \, dx &=-\frac {2 \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ &=\frac {2 \sqrt {a} \sinh ^{-1}\left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 54, normalized size = 1.46 \begin {gather*} -\frac {2 \text {ArcSin}\left (\sqrt {\sec (e+f x)}\right ) \sqrt {a (1+\sec (e+f x))} \tan \left (\frac {1}{2} (e+f x)\right )}{f \sqrt {1-\sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(146\) vs.
\(2(31)=62\).
time = 0.58, size = 147, normalized size = 3.97
method | result | size |
default | \(\frac {\sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}\, \sqrt {\frac {1}{\cos \left (f x +e \right )}}\, \cos \left (f x +e \right ) \left (-1+\cos \left (f x +e \right )\right ) \left (\arctan \left (\frac {\sqrt {-\frac {2}{\cos \left (f x +e \right )+1}}\, \left (1+\cos \left (f x +e \right )-\sin \left (f x +e \right )\right ) \sqrt {2}}{4}\right )-\arctan \left (\frac {\sqrt {-\frac {2}{\cos \left (f x +e \right )+1}}\, \left (1+\cos \left (f x +e \right )+\sin \left (f x +e \right )\right ) \sqrt {2}}{4}\right )\right ) \sqrt {2}}{f \sqrt {-\frac {2}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right )^{2}}\) | \(147\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 257 vs.
\(2 (33) = 66\).
time = 0.56, size = 257, normalized size = 6.95 \begin {gather*} \frac {\sqrt {a} {\left (\log \left (2 \, \cos \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2\right ) - \log \left (2 \, \cos \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2\right ) + \log \left (2 \, \cos \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2\right ) - \log \left (2 \, \cos \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2\right )\right )}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 83 vs.
\(2 (33) = 66\).
time = 2.91, size = 205, normalized size = 5.54 \begin {gather*} \left [\frac {\sqrt {a} \log \left (\frac {a \cos \left (f x + e\right )^{3} - 7 \, a \cos \left (f x + e\right )^{2} - \frac {4 \, {\left (\cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{\sqrt {\cos \left (f x + e\right )}} + 8 \, a}{\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2}}\right )}{2 \, f}, \frac {\sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\cos \left (f x + e\right )} \sin \left (f x + e\right )}{a \cos \left (f x + e\right )^{2} - a \cos \left (f x + e\right ) - 2 \, a}\right )}{f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\sec {\left (e + f x \right )} + 1\right )} \sqrt {\sec {\left (e + f x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,\sqrt {\frac {1}{\cos \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________